<?php 
include("function.php"); 
if(isset($_GET["action"])){
	if(empty($_GET["action"])){
	alert_error("登录时获取参数为空！","00012");
		}
		if(isset($_POST["user_id"]) and isset($_POST["user_pwd"]) and $_GET["action"]=="user_login"){
			$user_id=trim($_POST["user_id"]);
			$user_pwd=trim($_POST["user_pwd"]);
			login_in($user_id,$user_pwd,false);
			}elseif(isset($_POST["admin_pwd"]) and isset($_POST["admin_id"]) and isset($_POST["yzm"]) and $_GET["action"]=="admin_login"){
				if($_POST["yzm"]!=$_SESSION["yzm"]){
					session_destroy();
					alert_error("验证码错误！");
					}
				$admin_id=trim($_POST["admin_id"]);
				$admin_pwd=trim($_POST["admin_pwd"]);
				login_in($admin_id,$admin_pwd,true);
				exit;
				}else{
					alert_error("登录时未能获取参数！","00010");
					}
	}else{
		alert_error("登录时未能获取参数！","00011");
		}








?>